package com.example.shiro.service.impl;

import com.example.shiro.entity.ShiroPermsInfo;
import com.example.shiro.mapper.ShiroPermsInfoMapper;
import com.example.shiro.service.base.impl.BaseServiceImpl;
import com.example.shiro.service.inter.ShiroPermsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: lex
 * @Date: 2018/10/14
 */
@Service
public class ShiroPermsInfoServiceImpl extends BaseServiceImpl<ShiroPermsInfo> implements ShiroPermsInfoService {

    @Autowired
    private ShiroPermsInfoMapper shiroPermsInfoMapper;

    @Override
    public List<ShiroPermsInfo> selectByUserId(Long userId) {
        ShiroPermsInfo shiroPermsInfo = new ShiroPermsInfo();
        shiroPermsInfo.setUserId(userId);
        shiroPermsInfo.setIsDelete(0);
        return shiroPermsInfoMapper.select(shiroPermsInfo);
    }
}
